﻿@model DogsClub.WebUI.Models.User
@{
    List<SelectListItem> sexDog = new List<SelectListItem>();
    if (ViewData["sexDog"] != null)
    {
        var a = ViewData["sexDog"] as IEnumerable<DogsClub.WebUI.Models.SexDog>;
        if (a != null)
        {
            sexDog.AddRange(a.Select(t => new SelectListItem() { Text = t.Name, Value = t.Id.ToString()}));
        }
    }
}
<link href="~/DatePicker/jquery-ui-DatePicker.css" rel="stylesheet" />
<div id="home">
    <div class="overlay">
        <div class="container">
            <div class="row ">
                <div class="col-md-4 col-md-offset-4">
                    <div class="div-trans text-center Registracya">
                        <h3 class="HeadRegistration">Регистрация</h3>
                        @using (Html.BeginForm("Registration", "Account"))
                        {
                            @Html.Hidden("ReturnUrl", ViewData["string ReturnUrl"])
                            <div class="col-lg-12 col-md-12 col-sm-12">
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.LastName, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.LastName, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Фамилия" } })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.FirstName, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Имя" } })

                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.MiddleName, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.MiddleName, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Отчество" } })

                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.BirthDate, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.BirthDate, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Дата рождения" } })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Электронный адрес" } })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.Password, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.Password, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Пароль" } })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.Phone, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.Phone, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Телефон" } })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.City, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.City, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Город" } })
                                </div>
                                <div class="form-group">
                                    @Html.DropDownList("GetSexDog", sexDog, new { @class = "form-control textAutor", @required = "required", @placeholder = "Пол" })
                                </div>
                                <div class="form-group">
                                    @Html.ValidationMessageFor(model => model.Address, "", new { @class = "text-danger" })
                                    @Html.EditorFor(model => model.Address, new { htmlAttributes = new { @class = "form-control textAutor", @required = "required", @placeholder = "Адрес" } })
                                </div>
                                <div class="form-group">
                                    <button type="submit" class="btn btn-success btn-block btn-lg">Зарегистрироваться</button>
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@section script{
<script src="~/DatePicker/DataPicker(1-10).js"></script>
<script src="~/DatePicker/DataPicker(1-11).js"></script>
<script src="~/DatePicker/MyScriptDatePicker.js"></script>

    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.js"></script>
    <script>
        $('#BirthDate').datepicker({
            dateFormat: 'dd.mm.yy'
        });
        $(function () {
            $("#BirthDate").datepicker();
        });
        $('#datepicker').datepicker('option', $.datepicker.regional["ru"]);

        jQuery(function ($) {
            $.datepicker.regional['ru'] = {
                monthNames: ['Яварь', 'Февраль', 'Март', 'Апрель',
                'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь',
                'Октябрь', 'Ноябрь', 'Декабрь'],
                dayNamesMin: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
                firstDay: 1,
            };
            $.datepicker.setDefaults($.datepicker.regional['ru']);
        });
        $.datepicker.setDefaults($.extend(
          $.datepicker.regional["ru"])
        );
    </script>

}
